package com.ruoyi.app.model.vo;

import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.web.bind.annotation.RequestParam;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Pattern;

@Data
public class LoginReq {


    @ApiModelProperty(notes = "手机号")
    @NotBlank(message = "手机号不可为空！")
    @Pattern(regexp = "^[1][3,4,5,6,7,8,9][0-9]{9}$", message = "手机号格式有误")
    private String phone;

    @ApiModelProperty(notes = "登录凭证: 密码或验证码")
    @NotBlank(message = "登录凭证不可为空！")
    private String voucher;

    @ApiModelProperty(notes = "登录类型: 0：密码 1：验证码")
    private int type;

}
